import java.io.FileInputStream;

import org.antlr.runtime.ANTLRInputStream;
import org.antlr.runtime.CommonTokenStream;


public class Run {
	public static void main(String[] args) throws Exception {
		if(args.length != 1) {
			System.err.println("Usage: Run <source code>");
			System.exit(0);
		}
		String filename = args[0];
		ANTLRInputStream input = new ANTLRInputStream(new FileInputStream(filename));
		CalcLexer lexer = new CalcLexer(input);
		CommonTokenStream tokenStream = new CommonTokenStream(lexer);
		CalcParser parser = new CalcParser(tokenStream);
		parser.prog();
	}
}
